package com.roger.cmdkit;

import com.roger.cmdkit.util.ExcelUtil;

import org.apache.poi.hssf.usermodel.HSSFSheet;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.swing.JApplet;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;
import sun.audio.AudioPlayer;
import sun.audio.AudioStream;

import static java.lang.Character.*;

public class Debug{

    public static void main(String[] arg) throws IOException, ParseException, JavaLayerException {
        //String s = new String("邓志勇x".getBytes( "gbk"),"utf-8");
        // System.out.println(s);
    }

    private static void getUrlInfo() throws IOException {
        URL url = new URL("https://kyfw.12306.cn/otn/leftTicket/init?linktypeid=dc&fs=上海,SHH&ts=北京,BJP&date=2019-11-25&flag=N,N,Y");
        HttpURLConnection http= (HttpURLConnection) url.openConnection();
        http.setConnectTimeout(1000*5);
        //String params="uid=roger"+'&'+"pwd=1234";
        http.setDoOutput(true);
        http.setRequestMethod("POST");
        OutputStream out=http.getOutputStream();
        //out.write(params.getBytes());
        out.flush();
        out.close();
        BufferedReader bufferedReader=new BufferedReader(new InputStreamReader(http.getInputStream()));
        String line="";
        StringBuilder sb=new StringBuilder();
        while ((line=bufferedReader.readLine())!=null){
            sb.append(line);
        }
        String result= sb.toString();
        System.out.print(result);
    }

    private static int f(int n){
        if(n<=2) return n;
        return f(n-1) +f (n-2);
    }

}
